import request from '@/utils/request'

const base_url = 'http://localhost:9010/ztyh/admin'
// 登录接口
export const getLoanList = (page, limit, form) => {
  return request({
    url: base_url + '/' + page + '/' + limit,
    method: 'get',
    params: form,
  })
}

export const getPostLoan = data => {
  return request({
    url: base_url + '/saveLoan',
    method: 'post',
    data,
  })
}

export const getPutLoan = data => {
  return request({
    url: base_url + '/saveLoan',
    method: 'post',
    data,
  })
}

export const getDeleteLoan = id => {
  return request({
    url: base_url + '/' + id,
    method: 'delete',
  })
}

export const getUpdateState = id => {
  return request({
    url: base_url + '/updateState/' + id,
    method: 'get',
  })
}
